计算机与现代化 ›› 2012, Vol. 198 ›› Issue (2): 66-68.doi: 10.3969/j.issn.1006-2475.2012.02.018

• 图像处理 • 上一篇    下一篇

基于KD树和NBS距离的颜色量化算法

侯艳丽   

  1. 商丘师范学院计算机与信息技术学院,河南 商丘 476000
  • 收稿日期:2011-10-08 修回日期:1900-01-01 出版日期:2012-02-24 发布日期:2012-02-24

Color Image Quantization Algorithm Based on KD-tree and NBS Distance

HOU Yan-li   

  1. School of Computer and Information Technology, Shangqiu Normal University, Shangqiu 476000, China
  • Received:2011-10-08 Revised:1900-01-01 Online:2012-02-24 Published:2012-02-24

摘要: 针对经典K均值聚类算法需要事先给定量化数目和量化时间长的问题,提出一种基于KD树和NBS距离的颜色量化算法。首先用中位切割算法对原始图像进行初始量化,然后依据NBS距离与人类视觉对颜色差别的定量关系确定出初始聚类中心,最后利用KD树作为数据结构来运行K均值聚类算法从而实现彩色图像的快速量化。测试实验在不需要事先给定量化数目的前提下,获得了较好的量化结果和较快的量化速度,表明所提算法是可行有效的。

关键词: 图像, 量化, 中位切割, K均值聚类, KD树

Abstract: Aiming at the problem of giving the number of quantization in advance and poor in-time performance of the conventional K-mean clustering, this paper proposes a color image quantization algorithm based on KD-tree clustering and NBS distance. Firstly, the original image is quantized using the middlecut algorithm. Secondly, based on the quantitative relation of the NBS distance and the color difference of human visual, the initial clustering centers and number are determined automatically. Thirdly, the K-mean clustering algorithm using the KD-tree data structure is applied to the color quantization, and then, a fast color image quantization effect is achieved. At last, simulations are performed on the presented algorithm, and the simulation result shows that the presented algorithm performs better in quantization effect and faster in running time.

Key words: image, quantization, middlecut, K-mean clustering, KD-tree

中图分类号: